<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h3>首页</h3>
    <div th:text="${msg}"></div>
    <div shiro:authenticated>
        <h4>hello, <shiro:principal /> </h4>
        <ul>
            <li><a th:href="@{/user}">用户</a></li>
            <li><a th:href="@{/order}">订单</a></li>
        </ul>
    </div>
    <div shiro:notAuthenticated>
        <a th:href="@{/login}">请登录</a>
    </div>

</body>
</html>